package com.hfb.mashibing.alip8.designpattern._12proxy;

import java.util.Random;
import java.util.concurrent.TimeUnit;

/**
 * Q：现有如下代码，问题：我想记录坦克的移动时间，该怎么做？
 */

public class V1Tank implements Movable {

    @Override
    public void move() {
        System.out.println("tank is moving.......");
        try {
            TimeUnit.SECONDS.sleep(new Random().nextInt(10000));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}

interface Movable {
    void move();
}
